import request from '../../utils/request'

export interface data {
  data: recommendInfoStoreModel
}
export interface recommendInfoStoreModel {

  bigPromotionModule: bigPromotionModule,
  categoryHotSellModule: categoryHotSellStoreModule,
  tagList: [],
  policyDescList: [],
  popularItemList: [],
  freshmanFlag: Boolean,
  focusList: [],
  sceneLightShoppingGuideModule: [],
  kingKongModule: {},
  indexActivityModule: []

}
// sceneLightShoppingGuideModule
// export type sceneLightShoppingGuideMode = sceneLightShoppingGuideModule[]
export interface sceneLightShoppingGuideModule {
  styleBanner: {},
  styleItem: {}
}
// bigPromotionModule
export interface itemListModel {
  "primarySkuPreSellStatus": number,
  "picUrl": string,
  "pieceUnitDesc": string,
  "pieceNum": number,
  "colorNum": number,
  "schemeUrl": string,
  "primarySkuPreSellPrice": number,
  "id": number
}
export type itemListTyModel = itemListModel[]
export interface floorListItemModel {
  cells: itemListModel
}
export type floorListModel = floorListItemModel[]
export interface bigPromotionModule {
  floorList: floorListModel

}
//kingKongModule
export interface kingKongListModel {

}
export type kingKongListTyModel = kingKongListModel[]
export interface kingKongInfoModule {
  background: string,
  kingKongList: kingKongListTyModel,
  norColor: string,
  selectedColor: string
}
//categoryHotSellModule
export interface categoryListInfoModel {
  picUrl: string,
  extra: Object,
  itemPicBeanList: [],
  categoryName: string,
  targetUrl: string,
  showPicUrl: string

}
export type categoryListModel = categoryListInfoModel[]
export interface categoryHotSellStoreModule {
  titleTargetUrl: string,
  title: string,
  categoryList: categoryListInfoModel  //这个吗？

}

export const reqRecommendInfo = () => {
  return request.get<any, data>('/xhr/index.json?__timestamp=1630131808529')
}

export const reqCatvInfo = (id: number) => {
  console.log('id', id)
  return request.get<any, any>(`/item/list.json?__timestamp=1630136511866&categoryId=${id}`)
}
// <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white" lazy-render>
// <van-swipe-item v-for="banner in home.categoryList" :key="banner.id">
// <img src="../.../../../assets.mao.jpeg" alt="">
// </van-swipe-item>
// </van-swipe>